home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat1 / ftp.z / ftp
Text File  |  1998-10-20  |  47KB  |  859 lines

  1.  
  2.  
  3.  
  4. ffffttttpppp((((1111CCCC))))                                                                ffffttttpppp((((1111CCCC))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ftp - Internet file transfer program
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ffffttttpppp [ ----vvvv ] [ ----dddd ] [ ----iiii ] [ ----nnnn ] [ ----gggg ] [ ----tttt ] [ hhhhoooosssstttt ]
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      _f_t_p is the user interface to the Internet standard File Transfer Protocol
  16.      (FTP).  The program allows a user to transfer files to and from a remote
  17.      network site.
  18.  
  19.      The client host with which _f_t_p is to communicate can be specified on the
  20.      command line.  If this is done, _f_t_p immediately attempts to establish a
  21.      connection to an FTP server on that host; otherwise, _f_t_p enters its
  22.      command interpreter and awaits instructions from the user.  When _f_t_p is
  23.      awaiting commands from the user, the prompt ffffttttpppp>>>> is provided to the user.
  24.      The following commands are recognized by _f_t_p:
  25.  
  26.      !!!! [ _c_o_m_m_a_n_d [ _a_r_g_s ] ]
  27.              Invoke an interactive shell on the local machine.  If there are
  28.              arguments, the first is taken to be a command to execute
  29.              directly, with the rest of the arguments as its arguments.
  30.  
  31.      $$$$ _m_a_c_r_o-_n_a_m_e [ _a_r_g_s ]
  32.              Execute the macro _m_a_c_r_o-_n_a_m_e that was defined with the mmmmaaaaccccddddeeeeffff
  33.              command.  Arguments are passed to the macro unglobbed.
  34.  
  35.      aaaaccccccccoooouuuunnnntttt [ _p_a_s_s_w_d ]
  36.              Supply a supplemental password required by a remote system for
  37.              access to resources once a login has been successfully completed.
  38.              If no argument is included, the user is prompted for an account
  39.              password in a non-echoing input mode.
  40.  
  41.      aaaappppppppeeeennnndddd _l_o_c_a_l-_f_i_l_e [ _r_e_m_o_t_e-_f_i_l_e ]
  42.              Append a local file to a file on the remote machine.  If _r_e_m_o_t_e-
  43.              _f_i_l_e is left unspecified, the local filename is used in naming
  44.              the remote file after being altered by any _n_t_r_a_n_s or _n_m_a_p
  45.              setting.  File transfer uses the current settings for _t_y_p_e,
  46.              _f_o_r_m_a_t, _m_o_d_e, and _s_t_r_u_c_t_u_r_e.
  47.  
  48.      aaaasssscccciiiiiiii   Set the file transfer _t_y_p_e to network ASCII.  This is the default
  49.              type if _f_t_p cannot determine the type of operating system running
  50.              on the remote machine or the remote operating system is not UNIX.
  51.  
  52.      bbbbeeeellllllll    Arrange that a bell be sounded after each file transfer command
  53.              is completed.
  54.  
  55.      bbbbiiiinnnnaaaarrrryyyy  Set the file transfer _t_y_p_e to support binary image transfer.
  56.              This is the default type if _f_t_p can determine that the remote
  57.              machine is running UNIX.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ffffttttpppp((((1111CCCC))))                                                                ffffttttpppp((((1111CCCC))))
  71.  
  72.  
  73.  
  74.      bbbbyyyyeeee     Terminate the FTP session with the remote server and exit _f_t_p.
  75.              An end of file also terminates the session and exits.
  76.  
  77.      ccccaaaasssseeee    Toggle remote computer filename case mapping during mmmmggggeeeetttt
  78.              commands.  When ccccaaaasssseeee is oooonnnn (default is ooooffffffff), remote computer
  79.              filenames with all letters in upper case are written in the local
  80.              directory with the letters mapped to lower case.
  81.  
  82.      ccccdddd _r_e_m_o_t_e-_d_i_r_e_c_t_o_r_y
  83.              Change the working directory on the remote machine to _r_e_m_o_t_e-
  84.              _d_i_r_e_c_t_o_r_y.
  85.  
  86.      ccccdddduuuupppp    Change the remote machine working directory to the parent of the
  87.              current remote machine working directory.
  88.  
  89.      cccchhhhmmmmoooodddd _m_o_d_e _f_i_l_e-_n_a_m_e
  90.              Change the permission modes for the file _f_i_l_e-_n_a_m_e on the remote
  91.              system to _m_o_d_e.
  92.  
  93.      cccclllloooosssseeee   Terminate the FTP session with the remote server, and return to
  94.              the command interpreter.  Any defined macros are erased.
  95.  
  96.      ccccrrrr      Toggle carriage return stripping during ascii type file
  97.              retrieval.  Records are denoted by a carriage return/linefeed
  98.              sequence during ascii type file transfer.  When ccccrrrr is oooonnnn (the
  99.              default), carriage returns are stripped from this sequence to
  100.              conform with the UNIX single linefeed record delimiter.  Records
  101.              on non-UNIX remote systems can contain single linefeeds; when an
  102.              ascii type transfer is made, these linefeeds can be distinguished
  103.              from a record delimiter only when ccccrrrr is ooooffffffff.
  104.  
  105.      ddddeeeelllleeeetttteeee _r_e_m_o_t_e-_f_i_l_e
  106.              Delete the file _r_e_m_o_t_e-_f_i_l_e on the remote machine.
  107.  
  108.      ddddeeeebbbbuuuugggg [ _d_e_b_u_g-_v_a_l_u_e ]
  109.              Toggle debugging mode.  If an optional _d_e_b_u_g-_v_a_l_u_e is specified,
  110.              it is used to set the debugging level.  When debugging is oooonnnn, _f_t_p
  111.              prints each command sent to the remote machine, preceded by the
  112.              string -------->>>>.
  113.  
  114.      ddddiiiirrrr [ _r_e_m_o_t_e-_d_i_r_e_c_t_o_r_y ] [ _l_o_c_a_l-_f_i_l_e ]
  115.              Print a listing of the directory contents in the directory,
  116.              _r_e_m_o_t_e-_d_i_r_e_c_t_o_r_y, and, optionally, placing the output in _l_o_c_a_l-
  117.              _f_i_l_e.  If interactive prompting is on, _f_t_p prompts the user to
  118.              verify that the last argument is indeed the target local file for
  119.              receiving ddddiiiirrrr output.  If no directory is specified, the current
  120.              working directory on the remote machine is used.  If no local
  121.              file is specified, or _l_o_c_a_l-_f_i_l_e is ----, output comes to the
  122.              terminal.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ffffttttpppp((((1111CCCC))))                                                                ffffttttpppp((((1111CCCC))))
  137.  
  138.  
  139.  
  140.      ddddiiiirrrreeeecccctttt [ _l_o_c_a_l|_r_e_m_o_t_e ] [ _s_i_z_e ]
  141.              Set direct I/O (see _f_c_n_t_l(2)).  If _s_i_z_e is not specified, 2
  142.              megabytes (2^21 bytes) will be used.  If neither _r_e_m_o_t_e or _l_o_c_a_l
  143.              is specified, the I/O size will be set on both the client and the
  144.              server; otherwise only the specified end is adjusted.  Setting
  145.              the remote direct I/O size only works with IRIX FTP servers.
  146.              _s_i_z_e must be at least 512K, and a multiple of 4K.
  147.  
  148.      ddddiiiissssccccoooonnnnnnnneeeecccctttt
  149.              A synonym for cccclllloooosssseeee.
  150.  
  151.      ffffoooorrrrmmmm _f_o_r_m_a_t
  152.              Set the file transfer _f_o_r_m to _f_o_r_m_a_t.  The default format is
  153.              ffffiiiilllleeee.
  154.  
  155.      ggggeeeetttt _r_e_m_o_t_e-_f_i_l_e [ _l_o_c_a_l-_f_i_l_e ]
  156.              Retrieve the _r_e_m_o_t_e-_f_i_l_e and store it on the local machine.  If
  157.              the local filename is not specified, it is given the same name it
  158.              has on the remote machine, subject to alteration by the current
  159.              _c_a_s_e, _n_t_r_a_n_s, and _n_m_a_p settings.  The current settings for _t_y_p_e,
  160.              _f_o_r_m, _m_o_d_e, and _s_t_r_u_c_t_u_r_e are used while transferring the file.
  161.  
  162.      gggglllloooobbbb    Toggle filename expansion for mmmmddddeeeelllleeeetttteeee, mmmmggggeeeetttt and mmmmppppuuuutttt.  If
  163.              globbing is turned ooooffffffff with gggglllloooobbbb, the filename arguments are
  164.              taken literally and not expanded.  Globbing for mmmmppppuuuutttt is done as
  165.              in ccccsssshhhh(1).  For mmmmddddeeeelllleeeetttteeee and mmmmggggeeeetttt, each remote filename is
  166.              expanded separately on the remote machine and the lists are not
  167.              merged.  Expansion of a directory name is likely to be different
  168.              from expansion of the name of an ordinary file:  the exact result
  169.              depends on the foreign operating system and FTP server, and can
  170.              be previewed by doing:
  171.  
  172.                   _mmmm_llll_ssss _r_e_m_o_t_e-_f_i_l_e_s _----
  173.  
  174.              Note:  mmmmggggeeeetttt and mmmmppppuuuutttt are not meant to transfer entire directory
  175.              subtrees of files.  That can be done by transferring a ttttaaaarrrr(1)
  176.              archive of the subtree (in binary mode).
  177.  
  178.      hhhhaaaasssshhhh    Toggle hash-sign (####) printing for each data block transferred.
  179.              The size of a data block is 1024 bytes.
  180.  
  181.      hhhheeeellllpppp [ _c_o_m_m_a_n_d ]
  182.              Print an informative message about the meaning of _c_o_m_m_a_n_d.  If no
  183.              argument is given, _f_t_p prints a list of the known commands.
  184.  
  185.      iiiiddddlllleeee [ _s_e_c_o_n_d_s ]
  186.              Set the inactivity timer on the remote server to _s_e_c_o_n_d_s seconds.
  187.              If _s_e_c_o_n_d_s is omitted, the current inactivity timer is printed.
  188.  
  189.      iiiimmmmaaaaggggeeee   See bbbbiiiinnnnaaaarrrryyyy.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ffffttttpppp((((1111CCCC))))                                                                ffffttttpppp((((1111CCCC))))
  203.  
  204.  
  205.  
  206.      llllccccdddd [ _d_i_r_e_c_t_o_r_y ]
  207.              Change the working directory on the local machine.  If no
  208.              _d_i_r_e_c_t_o_r_y is specified, the user's home directory is used.
  209.  
  210.      llllssss [ _r_e_m_o_t_e-_d_i_r_e_c_t_o_r_y ] [ _l_o_c_a_l-_f_i_l_e ]
  211.              Print a listing of the contents of a directory on the remote
  212.              machine.  The listing includes any system-dependent information
  213.              that the server chooses to include; for example, most UNIX
  214.              systems produce output from the command llllssss ----llllAAAA.  (See also
  215.              nnnnlllliiiisssstttt.)  If _r_e_m_o_t_e-_d_i_r_e_c_t_o_r_y is left unspecified, the current
  216.              working directory is used.  If interactive prompting is on, _f_t_p
  217.              prompts the user to verify that the last argument is indeed the
  218.              target local file for receiving llllssss output.  If no local file is
  219.              specified, or if _l_o_c_a_l-_f_i_l_e is ----, the output is sent to the
  220.              terminal.
  221.  
  222.      mmmmaaaaccccddddeeeeffff _m_a_c_r_o-_n_a_m_e
  223.              Define a macro.  Subsequent lines are stored as the macro _m_a_c_r_o-
  224.              _n_a_m_e; a null line (consecutive newline characters in a file or
  225.              carriage returns from the terminal) terminates macro input mode.
  226.              There is a limit of 16 macros and 4096 total characters in all
  227.              defined macros.  Macros remain defined until a cccclllloooosssseeee command is
  228.              executed.  The macro processor interprets $$$$ and \\\\ as special
  229.              characters.  A $$$$ followed by a number (or numbers) is replaced by
  230.              the corresponding argument on the macro invocation command line.
  231.              A $$$$ followed by an iiii signals that macro processor that the
  232.              executing macro is to be looped.  On the first pass $$$$iiii is
  233.              replaced by the first argument on the macro invocation command
  234.              line, on the second pass it is replaced by the second argument,
  235.              and so on.  A \\\\ followed by any character is replaced by that
  236.              character.  Use the \\\\ to prevent special treatment of the $$$$.
  237.  
  238.      mmmmddddeeeelllleeeetttteeee [ _r_e_m_o_t_e-_f_i_l_e_s ]
  239.              Delete the _r_e_m_o_t_e-_f_i_l_e_s on the remote machine.
  240.  
  241.      mmmmddddiiiirrrr _r_e_m_o_t_e-_f_i_l_e_s _l_o_c_a_l-_f_i_l_e
  242.              Like ddddiiiirrrr, except multiple remote files can be specified.  If
  243.              interactive prompting is on, _f_t_p prompts the user to verify that
  244.              the last argument is indeed the target local file for receiving
  245.              mmmmddddiiiirrrr output.
  246.  
  247.      mmmmggggeeeetttt _r_e_m_o_t_e-_f_i_l_e_s
  248.              Expand the _r_e_m_o_t_e-_f_i_l_e_s on the remote machine and do a ggggeeeetttt for
  249.              each filename thus produced.  See gggglllloooobbbb for details on the
  250.              filename expansion.  Resulting filenames are then processed
  251.              according to _c_a_s_e, _n_t_r_a_n_s, and _n_m_a_p settings.  Files are
  252.              transferred into the local working directory, which can be
  253.              changed with llllccccdddd _d_i_r_e_c_t_o_r_y; new local directories can be created
  254.              with !!!! mmmmkkkkddddiiiirrrr _d_i_r_e_c_t_o_r_y.
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. ffffttttpppp((((1111CCCC))))                                                                ffffttttpppp((((1111CCCC))))
  269.  
  270.  
  271.  
  272.      mmmmkkkkddddiiiirrrr _d_i_r_e_c_t_o_r_y-_n_a_m_e
  273.              Make a directory on the remote machine.
  274.  
  275.      mmmmllllssss _r_e_m_o_t_e-_f_i_l_e_s _l_o_c_a_l-_f_i_l_e
  276.              Like nnnnlllliiiisssstttt, except multiple remote files can be specified, and
  277.              the _l_o_c_a_l-_f_i_l_e must be specified.  If interactive prompting is
  278.              on, _f_t_p prompts the user to verify that the last argument is
  279.              indeed the target local file for receiving mmmmllllssss output.
  280.  
  281.      mmmmooooddddeeee [ _m_o_d_e-_n_a_m_e ]
  282.              Set the file transfer _m_o_d_e to _m_o_d_e-_n_a_m_e.  The default mode is
  283.              ssssttttrrrreeeeaaaammmm mode.
  284.  
  285.      mmmmooooddddttttiiiimmmmeeee _f_i_l_e-_n_a_m_e
  286.              Show the last modification time of the file on the remote
  287.              machine.
  288.  
  289.      mmmmppppuuuutttt _l_o_c_a_l-_f_i_l_e_s
  290.              Expand wild cards in the list of local files given as arguments
  291.              and do a ppppuuuutttt for each file in the resulting list.  See gggglllloooobbbb for
  292.              details of filename expansion.  Resulting filenames are then be
  293.              processed according to _n_t_r_a_n_s and _n_m_a_p settings.
  294.  
  295.      nnnneeeewwwweeeerrrr _f_i_l_e-_n_a_m_e
  296.              Get the file only if the modification time of the remote file is
  297.              more recent that the file on the current system.  If the file
  298.              does not exist on the current system, the remote file is
  299.              considered _n_e_w_e_r.  Otherwise, this command is identical to ggggeeeetttt.
  300.  
  301.      nnnnlllliiiisssstttt [ _r_e_m_o_t_e-_d_i_r_e_c_t_o_r_y ] [ _l_o_c_a_l-_f_i_l_e ]
  302.              Print a  list of the files of a directory on the remote machine.
  303.              If _r_e_m_o_t_e-_d_i_r_e_c_t_o_r_y is left unspecified, the current working
  304.              directory is used.  If interactive prompting is on, _f_t_p prompts
  305.              the user to verify that the last argument is indeed the target
  306.              local file for receiving nnnnlllliiiisssstttt output.  If no local file is
  307.              specified, or if _l_o_c_a_l-_f_i_l_e is ----, the output is sent to the
  308.              terminal.
  309.  
  310.      nnnnmmmmaaaapppp [ _i_n_p_a_t_t_e_r_n _o_u_t_p_a_t_t_e_r_n ]
  311.              Set or unset the filename mapping mechanism.  If no arguments are
  312.              specified, the filename mapping mechanism is unset.  If arguments
  313.              are specified, remote filenames are mapped during mmmmppppuuuutttt commands
  314.              and ppppuuuutttt commands issued without a specified remote target
  315.              filename.  If arguments are specified, local filenames are mapped
  316.              during mmmmggggeeeetttt commands and ggggeeeetttt commands issued without a specified
  317.              local target filename.  This command is useful when connecting to
  318.              a non-UNIX remote computer with different file naming conventions
  319.              or practices.  The mapping follows the pattern set by _i_n_p_a_t_t_e_r_n
  320.              and _o_u_t_p_a_t_t_e_r_n.  _i_n_p_a_t_t_e_r_n is a template for incoming filenames
  321.              (which may have already been processed according to the nnnnttttrrrraaaannnnssss
  322.              and ccccaaaasssseeee settings).  Variable templating is accomplished by
  323.              including the sequences $$$$1111, $$$$2222, ..., $$$$9999 in _i_n_p_a_t_t_e_r_n.  Use \\\\ to
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. ffffttttpppp((((1111CCCC))))                                                                ffffttttpppp((((1111CCCC))))
  335.  
  336.  
  337.  
  338.              prevent this special treatment of the $$$$ character.  All other
  339.              characters are treated literally, and are used to determine the
  340.              nnnnmmmmaaaapppp _i_n_p_a_t_t_e_r_n variable values.  For example, given _i_n_p_a_t_t_e_r_n
  341.              $1.$2 and the remote filename mmmmyyyyddddaaaattttaaaa....ddddaaaattttaaaa, $1 would have the
  342.              value mmmmyyyyddddaaaattttaaaa, and $2 would have the value ddddaaaattttaaaa.  The _o_u_t_p_a_t_t_e_r_n
  343.              determines the resulting mapped filename.  The sequences $$$$1111, $$$$2222,
  344.              ...., $$$$9999 are replaced by any value resulting from the _i_n_p_a_t_t_e_r_n
  345.              template.  The sequence $$$$0000 is replace by the original filename.
  346.              Additionally, the sequence [[[[_s_e_q_1,,,,_s_e_q_2]]]] is replaced by _s_e_q_1 if
  347.              _s_e_q_1 is not a null string; otherwise it is replaced by _s_e_q_2.  For
  348.              example, the command nnnnmmmmaaaapppp $$$$1111....$$$$2222....$$$$3333 [[[[$$$$1111,,,,$$$$2222]]]]....[[[[$$$$2222,,,,ffffiiiilllleeee]]]] would yield
  349.              the output filename mmmmyyyyffffiiiilllleeee....ddddaaaattttaaaa for input filenames mmmmyyyyffffiiiilllleeee....ddddaaaattttaaaa
  350.              and mmmmyyyyffffiiiilllleeee....ddddaaaattttaaaa....oooolllldddd, mmmmyyyyffffiiiilllleeee....ffffiiiilllleeee for the input filename mmmmyyyyffffiiiilllleeee,
  351.              and mmmmyyyyffffiiiilllleeee....mmmmyyyyffffiiiilllleeee for the input filename ....mmmmyyyyffffiiiilllleeee.  Spaces can be
  352.              included in _o_u_t_p_a_t_t_e_r_n, as in this example:
  353.  
  354.                   _nnnn_mmmm_aaaa_pppp _$$$$_1111 _||||_ssss_eeee_dddd _""""_ssss_////  _****_$$$$_////_////_"""" _>>>> _$$$$_1111
  355.  
  356.              Use the \\\\ character to prevent special treatment of the $$$$, [[[[, ]]]],
  357.              and ,,,, characters.
  358.  
  359.      nnnnttttrrrraaaannnnssss [ _i_n_c_h_a_r_s [ _o_u_t_c_h_a_r_s ] ]
  360.              Set or unset the filename character translation mechanism.  If no
  361.              arguments are specified, the filename character translation
  362.              mechanism is unset.  If arguments are specified, characters in
  363.              remote filenames are translated during mmmmppppuuuutttt commands and ppppuuuutttt
  364.              commands issued without a specified remote target filename.  If
  365.              arguments are specified, characters in local filenames are
  366.              translated during mmmmggggeeeetttt commands and ggggeeeetttt commands issued without a
  367.              specified local target filename.  This command is useful when
  368.              connecting to a non-UNIX remote computer with different file
  369.              naming conventions or practices.  Characters in a filename
  370.              matching a character in _i_n_c_h_a_r_s are replaced with the
  371.              corresponding character in _o_u_t_c_h_a_r_s.  If the character's position
  372.              in _i_n_c_h_a_r_s is longer than the length of _o_u_t_c_h_a_r_s, the character
  373.              is deleted from the filename.
  374.  
  375.      ooooppppeeeennnn _h_o_s_t [ _p_o_r_t ]
  376.              Establish a connection to the specified _h_o_s_t FTP server.  An
  377.              optional port number can be supplied, in which case, _f_t_p attempts
  378.              to contact an FTP server at that port.  If the _a_u_t_o-_l_o_g_i_n option
  379.              is on (default), _f_t_p also attempts to automatically log the user
  380.              in to the FTP server (see below).
  381.  
  382.      pppprrrroooommmmpppptttt  Toggle interactive prompting.  Interactive prompting occurs
  383.              during multiple file transfers to allow the user to selectively
  384.              retrieve or store files.  If prompting is turned ooooffffffff (default is
  385.              oooonnnn), any mmmmggggeeeetttt or mmmmppppuuuutttt transfers all files, and any mmmmddddeeeelllleeeetttteeee
  386.              deletes all files.
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. ffffttttpppp((((1111CCCC))))                                                                ffffttttpppp((((1111CCCC))))
  401.  
  402.  
  403.  
  404.      pppprrrrooooxxxxyyyy _f_t_p-_c_o_m_m_a_n_d
  405.              Execute an _f_t_p command on a secondary control connection.  This
  406.              command allows simultaneous connection to two remote FTP servers
  407.              for transferring files between the two servers.  The first pppprrrrooooxxxxyyyy
  408.              command should be an ooooppppeeeennnn, to establish the secondary control
  409.              connection.  Enter the command pppprrrrooooxxxxyyyy ???? to see other _f_t_p commands
  410.              executable on the secondary connection.  The following commands
  411.              behave differently when prefaced by pppprrrrooooxxxxyyyy:
  412.  
  413.              ooooppppeeeennnn           Does not define new macros during the auto-login
  414.                             process.
  415.  
  416.              cccclllloooosssseeee          Does not erase existing macro definitions.
  417.  
  418.              ggggeeeetttt and mmmmggggeeeetttt   Transfer files from the host on the primary
  419.                             control connection to the host on the secondary
  420.                             control connection.
  421.  
  422.              ppppuuuutttt, mmmmppppuuuutttt, and aaaappppppppeeeennnndddd
  423.                             Transfer files from the host on the secondary
  424.                             control connection to the host on the primary
  425.                             control connection.
  426.  
  427.              Third party file transfers depend upon support of the FTP
  428.              protocol PASV command by the server on the secondary control
  429.              connection.
  430.  
  431.      ppppuuuutttt _l_o_c_a_l-_f_i_l_e [ _r_e_m_o_t_e-_f_i_l_e ]
  432.              Store a local file on the remote machine.  If _r_e_m_o_t_e-_f_i_l_e is left
  433.              unspecified, the local filename is used after processing
  434.              according to any _n_t_r_a_n_s or _n_m_a_p settings in naming the remote
  435.              file.  File transfer uses the current settings for _t_y_p_e, _f_o_r_m_a_t,
  436.              _m_o_d_e, and _s_t_r_u_c_t_u_r_e.
  437.  
  438.      ppppwwwwdddd     Print the name of the current working directory on the remote
  439.              machine.
  440.  
  441.      qqqquuuuiiiitttt    A synonym for bbbbyyyyeeee.
  442.  
  443.      qqqquuuuooootttteeee _a_r_g_1 _a_r_g_2 ...
  444.              The arguments specified are sent, verbatim, to the remote FTP
  445.              server.
  446.  
  447.      rrrreeeeccccvvvv _r_e_m_o_t_e-_f_i_l_e [ _l_o_c_a_l-_f_i_l_e ]
  448.              A synonym for get.
  449.  
  450.      rrrreeeeggggeeeetttt _r_e_m_o_t_e-_f_i_l_e [ _l_o_c_a_l-_f_i_l_e ]
  451.              Reget acts like get, except that if _l_o_c_a_l-_f_i_l_e exists and is
  452.              smaller than _r_e_m_o_t_e-_f_i_l_e, _l_o_c_a_l-_f_i_l_e is presumed to be a
  453.              partially transferred copy of _r_e_m_o_t_e-_f_i_l_e and the transfer is
  454.              continued from the apparent point of failure.  This command is
  455.              useful when transferring very large files over networks that are
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. ffffttttpppp((((1111CCCC))))                                                                ffffttttpppp((((1111CCCC))))
  467.  
  468.  
  469.  
  470.              prone to dropping connections.
  471.  
  472.      rrrrhhhheeeellllpppp [ _c_o_m_m_a_n_d-_n_a_m_e ]
  473.              Request help from the remote FTP server.  If a _c_o_m_m_a_n_d-_n_a_m_e is
  474.              specified it is supplied to the server as well.
  475.  
  476.      rrrrssssttttaaaattttuuuussss [ _f_i_l_e-_n_a_m_e ]
  477.              With no arguments, show status of remote machine.  If _f_i_l_e-_n_a_m_e
  478.              is specified, show status of _f_i_l_e-_n_a_m_e on remote machine.
  479.  
  480.      rrrreeeennnnaaaammmmeeee [ _f_r_o_m ] [ _t_o ]
  481.              Rename the file _f_r_o_m on the remote machine, to the file _t_o.
  482.  
  483.      rrrreeeesssseeeetttt   Clear reply queue.  This command re-synchronizes command/reply
  484.              sequencing with the remote FTP server.  Resynchronization may be
  485.              necessary following a violation of the FTP protocol by the remote
  486.              server.
  487.  
  488.      rrrreeeessssttttaaaarrrrtttt _m_a_r_k_e_r
  489.              Restart the immediately following ggggeeeetttt or ppppuuuutttt at the indicated
  490.              _m_a_r_k_e_r.  On UNIX systems, marker is usually a byte offset into
  491.              the file.
  492.  
  493.      rrrrmmmmddddiiiirrrr _d_i_r_e_c_t_o_r_y-_n_a_m_e
  494.              Delete a directory on the remote machine.
  495.  
  496.      rrrruuuunnnniiiiqqqquuuueeee Toggle storing of files on the local system with unique
  497.              filenames.  If a file already exists with a name equal to the
  498.              target local filename for a ggggeeeetttt or mmmmggggeeeetttt command, a ....1111 is appended
  499.              to the name.  If the resulting name matches another existing
  500.              file, a ....2222 is appended to the original name.  If this process
  501.              continues up to ....99999999, an error message is printed, and the
  502.              transfer does not take place.  The generated unique filename is
  503.              reported.  Note that rrrruuuunnnniiiiqqqquuuueeee does not affect local files
  504.              generated from a shell command (see below).  The default value is
  505.              ooooffffffff.
  506.  
  507.      sssseeeennnndddd _l_o_c_a_l-_f_i_l_e [ _r_e_m_o_t_e-_f_i_l_e ]
  508.              A synonym for put.
  509.  
  510.      sssseeeennnnddddppppoooorrrrtttt
  511.              Toggle the use of PORT commands.  By default, _f_t_p attempts to use
  512.              a PORT command when establishing a connection for each data
  513.              transfer.  The use of PORT commands can prevent delays when
  514.              performing multiple file transfers.  If the PORT command fails,
  515.              _f_t_p uses the default data port.  When the use of PORT commands is
  516.              disabled, no attempt is made to use PORT commands for each data
  517.              transfer.  This is useful for certain FTP implementations that do
  518.              ignore PORT commands but, incorrectly, indicate they've been
  519.              accepted.
  520.  
  521.  
  522.  
  523.  
  524.  
  525.                                                                         PPPPaaaaggggeeee 8888
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. ffffttttpppp((((1111CCCC))))                                                                ffffttttpppp((((1111CCCC))))
  533.  
  534.  
  535.  
  536.      ssssiiiitttteeee _a_r_g_1 _a_r_g_2 ...
  537.              The arguments specified are sent, verbatim, to the remote FTP
  538.              server as a SITE command.
  539.  
  540.      ssssiiiizzzzeeee _f_i_l_e-_n_a_m_e
  541.              Return size of _f_i_l_e-_n_a_m_e on remote machine.
  542.  
  543.      ssssttttaaaattttuuuussss  Show the current status of _f_t_p.
  544.  
  545.      ssssttttrrrruuuucccctttt [ _s_t_r_u_c_t-_n_a_m_e ]
  546.              Set the file transfer _s_t_r_u_c_t_u_r_e to _s_t_r_u_c_t-_n_a_m_e.  By default
  547.              ssssttttrrrreeeeaaaammmm structure is used.
  548.  
  549.      ssssuuuunnnniiiiqqqquuuueeee Toggle storing of files on remote machine under unique filenames.
  550.              Remote FTP server must support FTP protocol STOU command for
  551.              successful completion.  The remote server reports a unique name.
  552.              Default value is ooooffffffff.
  553.  
  554.      ssssyyyysssstttteeeemmmm  Show the type of operating system running on the remote machine.
  555.  
  556.      tttteeeennnneeeexxxx   Set the file transfer type to that needed to talk to TENEX
  557.              machines.
  558.  
  559.      ttttrrrraaaacccceeee   Toggle packet tracing.
  560.  
  561.      ttttyyyyppppeeee [ _t_y_p_e-_n_a_m_e ]
  562.              Set the file transfer _t_y_p_e to _t_y_p_e-_n_a_m_e.  If no type is
  563.              specified, the current type is printed.  The default type is
  564.              network ASCII.
  565.  
  566.      uuuummmmaaaasssskkkk [ _n_e_w_m_a_s_k ]
  567.              Set the default umask on the remote server to _n_e_w_m_a_s_k.  If
  568.              _n_e_w_m_a_s_k is omitted, the current umask is printed.
  569.  
  570.      uuuusssseeeerrrr _u_s_e_r-_n_a_m_e [ _p_a_s_s_w_o_r_d ] [ _a_c_c_o_u_n_t ]
  571.              Identify yourself to the remote FTP server.  If the password is
  572.              not specified and the server requires it, _f_t_p prompts the user
  573.              for it (after disabling local echo).  If an account field is not
  574.              specified, and the FTP server requires it, the user is prompted
  575.              for it.  If an account field is specified, an account command is
  576.              relayed to the remote server after the login sequence is
  577.              completed if the remote server did not require it for logging in.
  578.              Unless _f_t_p is invoked with aaaauuuuttttoooo----llllooooggggiiiinnnn disabled, this process is
  579.              done automatically on initial connection to the FTP server.
  580.  
  581.      vvvveeeerrrrbbbboooosssseeee Toggle verbose mode.  In verbose mode, all responses from the FTP
  582.              server are displayed to the user.  In addition, if verbose is on,
  583.              when a file transfer completes, statistics regarding the
  584.              efficiency of the transfer are reported.  By default, verbose is
  585.              on.
  586.  
  587.  
  588.  
  589.  
  590.  
  591.                                                                         PPPPaaaaggggeeee 9999
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. ffffttttpppp((((1111CCCC))))                                                                ffffttttpppp((((1111CCCC))))
  599.  
  600.  
  601.  
  602.      wwwwiiiinnnn [[[[ _s_i_z_e ]]]]
  603.              Sets the TCP window size to _s_i_z_e.  If _s_i_z_e is not specified, 2
  604.              megabytes (2^21 bytes) is used.  Setting the window size on the
  605.              remote system only works with IRIX FTP servers.  _s_i_z_e must be a
  606.              decimal integer between 1024 and 1G (1073741824).  If the last
  607.              character of _s_i_z_e is 'k' or 'm', _s_i_z_e is multiplied by 1024 or
  608.              (1024*1024) respectively.
  609.  
  610.      ???? [ _c_o_m_m_a_n_d ]
  611.              A synonym for help.
  612.  
  613.      Command arguments that have embedded spaces can be quoted with quote ("""")
  614.      marks.
  615.  
  616. AAAABBBBOOOORRRRTTTTIIIINNNNGGGG AAAA FFFFIIIILLLLEEEE TTTTRRRRAAAANNNNSSSSFFFFEEEERRRR
  617.      To abort a file transfer, use the terminal interrupt key (usually <Ctrl-
  618.      c>).  Sending transfers are immediately halted.  Receiving transfers are
  619.      halted by sending a FTP protocol ABOR command to the remote server and
  620.      discarding any further data received.  The speed at which this is
  621.      accomplished depends upon the remote server's support for ABOR
  622.      processing.  If the remote server does not support the ABOR command, an
  623.      ffffttttpppp>>>> prompt does not appear until the remote server has completed sending
  624.      the requested file.
  625.  
  626.      The terminal interrupt key sequence is ignored when _f_t_p has completed any
  627.      local processing and is awaiting a reply from the remote server.  A long
  628.      delay in this mode can result from the ABOR processing described above or
  629.      from unexpected behavior by the remote server, including violations of
  630.      the FTP protocol.  If the delay results from unexpected remote server
  631.      behavior, the local _f_t_p program must be killed by hand.
  632.  
  633. FFFFIIIILLLLEEEE NNNNAAAAMMMMIIIINNNNGGGG CCCCOOOONNNNVVVVEEEENNNNTTTTIIIIOOOONNNNSSSS
  634.      Files specified as arguments to _f_t_p commands are processed according to
  635.      the following rules.
  636.  
  637.      1.  If the filename ---- is specified, the ssssttttddddiiiinnnn (for reading) or ssssttttddddoooouuuutttt
  638.          (for writing) is used.
  639.  
  640.      2.  If the first character of the filename is ||||, the remainder of the
  641.          argument is interpreted as a shell command.  _f_t_p then forks a shell,
  642.          using _p_o_p_e_n(3S) with the argument supplied, and reads (writes) from
  643.          the stdout (stdin).  If the shell command includes spaces, the
  644.          argument must be quoted; for example, """"|||| llllssss ----lllltttt"""".  A particularly
  645.          useful example of this mechanism is: ddddiiiirrrr |||| mmmmoooorrrreeee.
  646.  
  647.      3.  Failing the above checks, if globbing is enabled, local filenames are
  648.          expanded according to the rules used in the _c_s_h(1) gggglllloooobbbb command.  If
  649.          the _f_t_p command expects a single local file (for example, ppppuuuutttt), only
  650.          the first filename generated by the globbing operation is used.
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.                                                                        PPPPaaaaggggeeee 11110000
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. ffffttttpppp((((1111CCCC))))                                                                ffffttttpppp((((1111CCCC))))
  665.  
  666.  
  667.  
  668.      4.  For mmmmggggeeeetttt commands and ggggeeeetttt commands with unspecified local filenames,
  669.          the local filename is the remote filename, which can be altered by a
  670.          ccccaaaasssseeee, nnnnttttrrrraaaannnnssss, or nnnnmmmmaaaapppp setting.  The resulting filename can then be
  671.          altered if rrrruuuunnnniiiiqqqquuuueeee is on.
  672.  
  673.      5.  For mmmmppppuuuutttt commands and ppppuuuutttt commands with unspecified remote filenames,
  674.          the remote filename is the local filename, which can be altered by a
  675.          nnnnttttrrrraaaannnnssss or nnnnmmmmaaaapppp setting.  The resulting filename can then be altered
  676.          by the remote server if ssssuuuunnnniiiiqqqquuuueeee is on.
  677.  
  678. FFFFIIIILLLLEEEE TTTTRRRRAAAANNNNSSSSFFFFEEEERRRR PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  679.      The FTP specification specifies many parameters that can affect a file
  680.      transfer.  The _t_y_p_e can be one of aaaasssscccciiiiiiii, iiiimmmmaaaaggggeeee (binary), eeeebbbbccccddddiiiicccc, and
  681.      llllooooccccaaaallll bbbbyyyytttteeee ssssiiiizzzzeeee (for PDP-10's and PDP-20's mostly).  _f_t_p supports the
  682.      ascii and image types of file transfer, plus local byte size 8 for tttteeeennnneeeexxxx
  683.      mode transfers.
  684.  
  685.      _f_t_p supports only the default values for the remaining file transfer
  686.      parameters:  _m_o_d_e, _f_o_r_m, and _s_t_r_u_c_t.
  687.  
  688. OOOOPPPPTTTTIIIIOOOONNNNSSSS
  689.      Options can be specified at the shell command line.  Several options can
  690.      be enabled or disabled with _f_t_p commands.
  691.  
  692.      ----vvvv   (vvvveeeerrrrbbbboooosssseeee oooonnnn) Forces _f_t_p to show all responses from the remote
  693.           server, as well as report on data transfer statistics.
  694.  
  695.      ----nnnn   Restrains _f_t_p from attempting aaaauuuuttttoooo----llllooooggggiiiinnnn upon initial connection.
  696.           If auto-login is enabled, _f_t_p checks the ._n_e_t_r_c file (see below) in
  697.           the user's home directory for an entry describing an account on the
  698.           remote machine.  If no entry exists, _f_t_p prompts for the remote
  699.           machine login name (default is the user identity on the local
  700.           machine), and, if necessary, prompt for a password and an account
  701.           with which to login.
  702.  
  703.      ----iiii   Turns off interactive prompting during multiple file transfers.
  704.  
  705.      ----dddd   Enables debugging.
  706.  
  707.      ----gggg   Disables filename globbing.
  708.  
  709.      ----tttt   Enables packet tracing (currently unimplemented).
  710.  
  711. TTTTHHHHEEEE ....NNNNEEEETTTTRRRRCCCC FFFFIIIILLLLEEEE
  712.      The ._n_e_t_r_c file contains login and initialization information used by the
  713.      auto-login process.  It resides in the user's home directory.  The
  714.      following tokens are recognized; they can be separated by spaces, tabs,
  715.      or newlines:
  716.  
  717.      mmmmaaaacccchhhhiiiinnnneeee _n_a_m_e      Identify a remote machine name.  The auto-login process
  718.                        searches the ._n_e_t_r_c file for a mmmmaaaacccchhhhiiiinnnneeee token that
  719.                        matches the remote machine specified on the _f_t_p command
  720.  
  721.  
  722.  
  723.                                                                        PPPPaaaaggggeeee 11111111
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. ffffttttpppp((((1111CCCC))))                                                                ffffttttpppp((((1111CCCC))))
  731.  
  732.  
  733.  
  734.                        line or as an ooooppppeeeennnn command argument.  Once a match is
  735.                        made, the subsequent ._n_e_t_r_c tokens are processed,
  736.                        stopping when the end of file is reached or another
  737.                        mmmmaaaacccchhhhiiiinnnneeee or a ddddeeeeffffaaaauuuulllltttt token is encountered.
  738.  
  739.      ddddeeeeffffaaaauuuulllltttt           This is the same as mmmmaaaacccchhhhiiiinnnneeee _n_a_m_e except that ddddeeeeffffaaaauuuulllltttt
  740.                        matches any name.  There can be only one ddddeeeeffffaaaauuuulllltttt token,
  741.                        and it must be after all mmmmaaaacccchhhhiiiinnnneeee tokens.  This is
  742.                        normally used as:
  743.  
  744.                             default login anonymous password user@site
  745.  
  746.                        thereby giving the user _a_u_t_o_m_a_t_i_c anonymous _f_t_p login
  747.                        to machines not specified in ._n_e_t_r_c.  This can be
  748.                        overridden by using the ----nnnn flag to disable auto-login.
  749.  
  750.      llllooooggggiiiinnnn _n_a_m_e        Identify a user on the remote machine.  If this token
  751.                        is present, the auto-login process initiates a login
  752.                        using the specified name.
  753.  
  754.      ppppaaaasssssssswwwwoooorrrrdddd _s_t_r_i_n_g   Supply a password.  If this token is present, the
  755.                        auto-login process supplies the specified string if the
  756.                        remote server requires a password as part of the login
  757.                        process.  Note that if this token is present in the
  758.                        ._n_e_t_r_c file for any user other than _a_n_o_n_y_m_o_u_s, _f_t_p
  759.                        aborts the auto-login process if the ._n_e_t_r_c is
  760.                        accessible by anyone besides the user (see below for
  761.                        the proper protection mode.)
  762.  
  763.      aaaaccccccccoooouuuunnnntttt _s_t_r_i_n_g    Supply an additional account password.  If this token
  764.                        is present, the auto-login process supplies the
  765.                        specified string if the remote server requires an
  766.                        additional account password, or the auto-login process
  767.                        initiates an ACCT command if it does not.  Note that if
  768.                        this token is present in the ._n_e_t_r_c file, _f_t_p aborts
  769.                        the auto-login process if the ._n_e_t_r_c is accessible by
  770.                        anyone besides the user (see below for the proper
  771.                        protection mode).
  772.  
  773.      mmmmaaaaccccddddeeeeffff _n_a_m_e       Define a macro.  This token functions like the _f_t_p
  774.                        mmmmaaaaccccddddeeeeffff command functions.  A macro is defined with the
  775.                        specified name; its contents begin with the next ._n_e_t_r_c
  776.                        line and continue until a null line (consecutive
  777.                        newline characters) is encountered.  If a macro named
  778.                        _i_n_i_t is defined, it is automatically executed as the
  779.                        last step in the auto-login process.
  780.  
  781.      The error message
  782.  
  783.           Error: .netrc file is readable by others.
  784.  
  785.      means the file is ignored by _f_t_p because the file's _p_a_s_s_w_o_r_d and/or
  786.  
  787.  
  788.  
  789.                                                                        PPPPaaaaggggeeee 11112222
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796. ffffttttpppp((((1111CCCC))))                                                                ffffttttpppp((((1111CCCC))))
  797.  
  798.  
  799.  
  800.      _a_c_c_o_u_n_t information is unprotected.  Use
  801.  
  802.           _cccc_hhhh_mmmm_oooo_dddd _gggg_oooo_----_rrrr_wwww_xxxx _...._nnnn_eeee_tttt_rrrr_cccc
  803.  
  804.      to protect the file.
  805.  
  806.      _N._B. Since commas are used as field delimiters, it is not currently
  807.      possible to use them in fields, such as in a password.
  808.  
  809. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  810.      ftpd(1M).
  811.  
  812. BBBBUUUUGGGGSSSS
  813.      Correct execution of many commands depends upon proper behavior by the
  814.      remote server.
  815.  
  816.      An error in the treatment of carriage returns in the 4.2BSD UNIX ascii-
  817.      mode transfer code has been corrected.  This correction may result in
  818.      incorrect transfers of binary files to and from 4.2BSD servers using the
  819.      ascii type.  Avoid this problem by using the binary image type.
  820.  
  821.      The 'direct' and 'win' commands are experimental, and may be obsoleted in
  822.      a future release.
  823.  
  824.      Using 'direct' or 'win' does not work in conjunction with 'hash'.
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.                                                                        PPPPaaaaggggeeee 11113333
  856.  
  857.  
  858.  
  859.